<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="../node_modules/@vue/reactivity/dist/reactivity.global.js"></script>
    <div id="app"></div>
    <script>
        let { effect, reactive ,ref ,shallowRef,toRef } = VueReactivity;
        let name = ref('zf'); // 将普通的类型 转化成一个对象，这个对象中有value属性 指向原来的值

        effect(() => { // 默认会执行  -》 会依赖收集 收集effect
            app.innerHTML = name.value // track
        })
        
        setTimeout(() => {
           name.value = 'jw'  // trigger
        }, 1000);
    </script>
</body>

</html>